<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateForumUserTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateForumUserLabel_username}" for="username" />
                    <h:inputText id="username" value="#{forumUserController.selected.username}" title="#{bundle.CreateForumUserTitle_username}" required="true" requiredMessage="#{bundle.CreateForumUserRequiredMessage_username}"/>
                    <h:outputLabel value="#{bundle.CreateForumUserLabel_firstName}" for="firstName" />
                    <h:inputText id="firstName" value="#{forumUserController.selected.firstName}" title="#{bundle.CreateForumUserTitle_firstName}" />
                    <h:outputLabel value="#{bundle.CreateForumUserLabel_lastName}" for="lastName" />
                    <h:inputText id="lastName" value="#{forumUserController.selected.lastName}" title="#{bundle.CreateForumUserTitle_lastName}" />
                    <h:outputLabel value="#{bundle.CreateForumUserLabel_password}" for="password" />
                    <h:inputText id="password" value="#{forumUserController.selected.password}" title="#{bundle.CreateForumUserTitle_password}" />
                    <h:outputLabel value="#{bundle.CreateForumUserLabel_regDate}" for="regDate" />
                    <h:inputText id="regDate" value="#{forumUserController.selected.regDate}" title="#{bundle.CreateForumUserTitle_regDate}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateForumUserLabel_role}" for="role" />
                    <h:inputText id="role" value="#{forumUserController.selected.role}" title="#{bundle.CreateForumUserTitle_role}" />
                </h:panelGrid>
                <br />
                <h:commandLink action="#{forumUserController.create}" value="#{bundle.CreateForumUserSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{forumUserController.prepareList}" value="#{bundle.CreateForumUserShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateForumUserIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
